package com.bianmaba.sso.resource.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: spring-oauth2.3.3-demo
 * @description:
 * @author: Chenjiabin
 * @create: 2018/11/7 8:36
 **/

@RestController
@RequestMapping("order")
public class OrderController {
    @PreAuthorize("hasRole('ADMIN')")
    @RequestMapping("query")
    public Object query() {
        return "query orders";
    }
}
